FROM php:7.4-fpm

#//更新软件源
RUN apt update
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN apt-get update \
     && apt-get install -y libzip-dev \
     && docker-php-ext-install zip
RUN #apt-get install zip unzip php7.4-zip

RUN chmod +x /usr/local/bin/install-php-extensions && sync && \
    install-php-extensions gd

RUN docker-php-ext-install pdo_mysql \
    && docker-php-ext-install bcmath \
&& pecl install -o -f redis \
    && rm -rf /tmp/pear \
        && docker-php-ext-enable redis

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
